package com.umpay.dto.merBusi.req.consume;

import java.util.List;
import java.util.StringJoiner;

import org.hibernate.validator.constraints.NotEmpty;

import com.umpay.annotation.Pattern;
import com.umpay.dto.merAccess.req.consume.SubOrderInfo;
import com.umpay.dto.merBusi.req.CommonBusiReq;

/* ******************  类说明  *********************
 * class       :  ConsumeGeneralOrderBusiReq
 * @author     :  ncc
 * @date       :  2018年3月15日 下午3:27:43
 * @version    :  1.0  
 * description :  业务下单
 * @see        :                        
 * ************************************************/   
public class ConsumeGeneralOrderBusiReq extends CommonBusiReq {
	
	@NotEmpty(message = "商户订单号不能为空")
	@Pattern(message="商户订单号格式不正确")
	private String orderId;	//变长32	商户订单号
	
	@NotEmpty(message = "商户订单日期不能为空")
	@Pattern(message="商户订单日期格式不正确")
	private String orderDate;	//定长8	商户订单日期
	
	@NotEmpty(message = "商户号不能为空")
	@Pattern(message="商户号格式不正确")
	private String merId;	//变长8	商户号
	
	@Pattern(message="用户号格式不正确")
	private String userId;	//变长20

    @Pattern
    private String merCustId;
	
	@Pattern(message="用户类型格式不正确")
	private String userType;	//定长2	
	
	@NotEmpty(message = "金额不能为空")
	@Pattern(message="金额格式不正确")
	private String amount;	//变长13	金额
	
	@NotEmpty(message = "订单类型不能为空")
	@Pattern(message="订单类型格式不正确")
	private String orderType;	//定长1
	
	@NotEmpty(message = "交易渠道不能为空")
	@Pattern(message="交易渠道格式不正确")
	private String orderChannel;	//定长1

	@NotEmpty(message = "业务产品号不能为空")
	@Pattern(message="业务产品号格式不正确")
	private String bproductId;	//变长8	业务产品号
	
	@NotEmpty(message = "支付产品号不能为空")
	@Pattern(message="支付产品号格式不正确")
	private String pproductId;	//变长8	支付产品号
	
	private String consigneeName;	//变长32	收货人
	private String consigneeAddress;	//变长50	收货地址
	private String consigneePhone;	//定长11	联系电话
//	@NotEmpty(message = "后台通知地址不能为空")
	@Pattern(message="后台通知地址格式不正确")
	private String notifyUrl;	//变长128	后台通知地址
//	@NotEmpty(message = "前台通知地址不能为空")
	@Pattern(message="前台通知地址格式不正确")
	private String retUrl;	//变长128	前台通知地址
	private String remark;	//变长100	备注信息
	private List<SubOrderInfo> sub_order_info;	//变长列表	子订单信息
	private List<WarrantSplitCmdBusi> splitCmdBusi;	//变长列表	分账信息
    private String paySubjectUserId; //支付主体链金用户号
    private String paySubjectMerCustId; //支付主体商户用户号
    private String paySubjectType; //支付主体类型 0-商户 1-会员
	public String getOrderId() {
		return orderId;
	}
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	public String getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}
	public String getMerId() {
		return merId;
	}
	public void setMerId(String merId) {
		this.merId = merId;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getUserType() {
		return userType;
	}
	public void setUserType(String userType) {
		this.userType = userType;
	}
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	
	public String getBproductId() {
		return bproductId;
	}
	public void setBproductId(String bproductId) {
		this.bproductId = bproductId;
	}
	public String getConsigneeName() {
		return consigneeName;
	}
	public void setConsigneeName(String consigneeName) {
		this.consigneeName = consigneeName;
	}
	public String getConsigneeAddress() {
		return consigneeAddress;
	}
	public void setConsigneeAddress(String consigneeAddress) {
		this.consigneeAddress = consigneeAddress;
	}
	public String getConsigneePhone() {
		return consigneePhone;
	}
	public void setConsigneePhone(String consigneePhone) {
		this.consigneePhone = consigneePhone;
	}
	public String getNotifyUrl() {
		return notifyUrl;
	}
	public void setNotifyUrl(String notifyUrl) {
		this.notifyUrl = notifyUrl;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public List<SubOrderInfo> getSub_order_info() {
		return sub_order_info;
	}
	public void setSub_order_info(List<SubOrderInfo> sub_order_info) {
		this.sub_order_info = sub_order_info;
	}
	public String getOrderType() {
		return orderType;
	}
	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
	public String getOrderChannel() {
		return orderChannel;
	}
	public void setOrderChannel(String orderChannel) {
		this.orderChannel = orderChannel;
	}
	
	public String getRetUrl() {
		return retUrl;
	}
	public void setRetUrl(String retUrl) {
		this.retUrl = retUrl;
	}
	public List<WarrantSplitCmdBusi> getSplitCmdBusi() {
		return splitCmdBusi;
	}
	public void setSplitCmdBusi(List<WarrantSplitCmdBusi> splitCmdBusi) {
		this.splitCmdBusi = splitCmdBusi;
	}
	public String getPproductId() {
		return pproductId;
	}
	public void setPproductId(String pproductId) {
		this.pproductId = pproductId;
	}

    public String getMerCustId() {
        return merCustId;
    }

    public void setMerCustId(String merCustId) {
        this.merCustId = merCustId;
    }

    public String getPaySubjectUserId() {
        return paySubjectUserId;
    }

    public void setPaySubjectUserId(String paySubjectUserId) {
        this.paySubjectUserId = paySubjectUserId;
    }

    public String getPaySubjectMerCustId() {
        return paySubjectMerCustId;
    }

    public void setPaySubjectMerCustId(String paySubjectMerCustId) {
        this.paySubjectMerCustId = paySubjectMerCustId;
    }

    public String getPaySubjectType() {
        return paySubjectType;
    }

    public void setPaySubjectType(String paySubjectType) {
        this.paySubjectType = paySubjectType;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", ConsumeGeneralOrderBusiReq.class.getSimpleName() + "[", "]")
                .add("orderId='" + orderId + "'")
                .add("orderDate='" + orderDate + "'")
                .add("merId='" + merId + "'")
                .add("userId='" + userId + "'")
                .add("merCustId='" + merCustId + "'")
                .add("userType='" + userType + "'")
                .add("amount='" + amount + "'")
                .add("orderType='" + orderType + "'")
                .add("orderChannel='" + orderChannel + "'")
                .add("bproductId='" + bproductId + "'")
                .add("pproductId='" + pproductId + "'")
                .add("consigneeName='" + consigneeName + "'")
                .add("consigneeAddress='" + consigneeAddress + "'")
                .add("consigneePhone='" + consigneePhone + "'")
                .add("notifyUrl='" + notifyUrl + "'")
                .add("retUrl='" + retUrl + "'")
                .add("remark='" + remark + "'")
                .add("sub_order_info=" + sub_order_info)
                .add("splitCmdBusi=" + splitCmdBusi)
                .add("paySubjectUserId='" + paySubjectUserId + "'")
                .add("paySubjectMerCustId='" + paySubjectMerCustId + "'")
                .add("paySubjectType='" + paySubjectType + "'")
                .add("rpid='" + rpid + "'")
                .add("version='" + version + "'")
                .add("reqDate='" + reqDate + "'")
                .add("reqTime='" + reqTime + "'")
                .add("accessName='" + accessName + "'")
                .add("accessType='" + accessType + "'")
                .add("depBankMerId='" + depBankMerId + "'")
                .toString();
    }
}
